CXX = ccache g++

INC = -I /home/mason/workspace/bmd/ -I /usr/local/include/wx-2.8
LIB = -lfreeimage -lGL  gldll_glcanvas.o libbmdvm.a
O_LIB = -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 `wx-config --cxxflags` 

FLAGS = -g -Wall  
SFLAGS = -Wall  -fsyntax-only
OBJS = main.o BMD_136.o vm_interface.o

.PHONY: check-syntax
check-syntax:
	$(CXX) $(SFLAGS) $(CHK_SOURCES)
.cpp.o:
	$(CXX) $(FLAGS) $(INC) $< -c -o $@ $(O_LIB)

libbmdvm.a: $(OBJS)
	ar rcs libbmdvm.a $(OBJS);

main:  $(OBJS)
	$(CXX) $(FLAGS) -o main $(INC) $(OBJS) `wx-config --libs --cxxflags` $(LIB) 

clean:
	rm -f *~ main *.gcov *.gcda *.gcno $(OBJS)

